#lang racket


(require "../base/main.rkt")

(provide arc-angle
         arc-radius)


(define (arc-angle radius sagitta)
  (* 2 (acos (- 1 (/ sagitta radius)))))

(define (arc-radius chord sagitta)
  (/
   (+ (* 4 (^2 sagitta)) (^2 chord))
   (* 8 sagitta)))